package com.zt.event.event.event;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.event.SpringApplicationEvent;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author system
 */
public class CustomsApplicationContextInitializedEvent extends SpringApplicationEvent {

    private final ConfigurableApplicationContext context;
    private final long costTime;

    /**
     * {@link CustomsApplicationContextInitializedEvent}
     *
     * @param application
     * @param args
     * @param context
     * @param costTime
     */
    public CustomsApplicationContextInitializedEvent(SpringApplication application, String[] args, ConfigurableApplicationContext context, long costTime) {
        super(application, args);
        this.context = context;
        this.costTime = costTime;
    }


    public ConfigurableApplicationContext getApplicationContext() {
        return this.context;
    }

    public long getCostTime() {
        return this.costTime;
    }
}
